<template>
  <el-carousel arrow="always" :autoplay="true">
    <el-carousel-item v-for="item in carouselArr.carouselArr" :key="item.length">
      <el-image class="carouseImg" :src="item.imageSrc"></el-image>
      <h3>{{ item.title }}</h3>
    </el-carousel-item>
  </el-carousel>
</template>

<script setup>
const carouselArr = defineProps({
  carouselArr: {
    type: Array,
    default: [{
      imageSrc: "@/assets/img/CarouselImages/09753acb-b1f0-438e-8209-dbda13fca68c&3f17b084.jpg",
      title: "图片1",
    }]
  }
});

</script>

<style scoped>


.el-carousel h3 {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 24px;
  font-weight: bold;
}
.el-carousel {
  margin: 10px auto 0 auto;
  width: 1200px;
  height: 300px;
  background: #bdbdbd;
  border-radius: 10px;
}

.carouseImg {
  margin-top: 45px;
  width: 100%;
  height: 100%;
}
</style>
